import random

from Systems.Stars.SolarCores import *
from Systems.SolarBodiesFactory import *

class BlueFactory(SolarCoreFactory):
    
    def makeCore(self):
        s = SolarCore()
    
        s.type = SolarCoreEnum.BLUE
        s.letterCode = "O"
        
        s.massLower = 16
        s.massUpper = 25        
        
        s.diameterLower = 6.6
        s.diameterUpper = 10
        
        s.brightnessLower = 30000
        s.brightnessUpper = 45000
                
        s.makeRandom()
                        
        return s
    
    def BlueBodiesFactory(self):
        return BlueBodiesFactory()
    
    def getOrbitalTable(self):
        return [1,1.5,3.3,5.2,9.5,19.5,30, 50, 100]

class BlueBodiesFactory(SolarBodiesFactory):
    
    def makeRandomSolarBody(self):
        pass

class BlueWhiteFactory(SolarCoreFactory):
    
    def makeCore(self):
        s = SolarCore()
    
        s.type = SolarCoreEnum.BLUEWHITE
        s.letterCode = "B"
        
        s.massLower = 2.1
        s.massUpper = 16       
        
        s.diameterLower = 1.8
        s.diameterUpper = 6.6
        
        s.brightnessLower = 25000
        s.brightnessUpper = 30000
                
        s.makeRandom()
                        
        return s
    
    def getOrbitalTable(self):
        return [1,1.5,3.3,5.2,9.5,19.5,30]
   
class YellowFactory(SolarCoreFactory):
    
    def makeCore(self):
        s = SolarCore()
    
        s.type = SolarCoreEnum.YELLOW
        s.letterCode = "G"
        
        s.massLower = 0.8
        s.massUpper = 1.04        
        
        s.diameterLower = 0.96
        s.diameterUpper = 1.15
        
        s.brightnessLower = 600
        s.brightnessUpper = 1150
                
        s.makeRandom()
                        
        return s
    
    def getOrbitalTable(self):
        return [.4,.7,1,1.5,3.3,5.2,9.5,19.5,30]
    
class YellowWhiteFactory(SolarCoreFactory):
    
    def makeCore(self):
        s = SolarCore()
    
        s.type = SolarCoreEnum.YELLOWWHITE
        s.letterCode = "F"
        
        s.massLower = 1.04
        s.massUpper = 1.4        
        
        s.diameterLower = 1.15
        s.diameterUpper = 1.4
        
        s.brightnessLower = 1500
        s.brightnessUpper = 5000
                
        s.makeRandom()
                        
        return s
    
    def getOrbitalTable(self):
        return [.4,.7,1,1.5,3.3,5.2,9.5,19.5,30]

class OrangeFactory(SolarCoreFactory):
    
    def makeCore(self):
        s = SolarCore()
    
        s.type = SolarCoreEnum.ORANGE
        s.letterCode = "K"
        
        s.massLower = 0.45
        s.massUpper = 0.8        
        
        s.diameterLower = 0.7
        s.diameterUpper = 0.96
        
        s.brightnessLower = 80
        s.brightnessUpper = 600
                
        s.makeRandom()
                        
        return s
    
    def getOrbitalTable(self):
        return [.4,.7,1,1.5,3.3,5.2,9.5,19.5,30]
    
class RedFactory(SolarCoreFactory):
    
    def makeCore(self):
        s = SolarCore()
    
        s.type = SolarCoreEnum.RED
        s.letterCode = "M"
        
        s.massLower = 0.2
        s.massUpper = 0.45        
        
        s.diameterLower = 0.2
        s.diameterUpper = 0.7
        
        s.brightnessLower = 10
        s.brightnessUpper = 80
                
        s.makeRandom()
                        
        return s
    
    def getOrbitalTable(self):
        return [.4,.7,1,1.5,3.3,5.2,9.5,19.5,30]

class BrownDwarfFactory(SolarCoreFactory):
    
    def makeCore(self):
        s = SolarCore()
    
        s.type = SolarCoreEnum.BLACK
        s.letterCode = "Z"
        
        s.massLower = .25
        s.massUpper = 3        
        
        s.diameterLower = 0.1
        s.diameterUpper = 0.5
        
        s.brightnessLower = 0
        s.brightnessUpper = 1
                
        s.makeRandom()
                        
        return s
    
    def getOrbitalTable(self):
        return [.4,.7,1,1.5,3.3,5.2,9.5,19.5,30]
    
class WhiteDwarfFactory(SolarCoreFactory):
    
    def makeCore(self):
        s = SolarCore()
    
        s.type = SolarCoreEnum.BLACK
        s.letterCode = "Z"
        
        s.massLower = .25
        s.massUpper = 3        
        
        s.diameterLower = 0.1
        s.diameterUpper = 0.5
        
        s.brightnessLower = 0
        s.brightnessUpper = 1
                
        s.makeRandom()
                        
        return s
    
    def getOrbitalTable(self):
        return [.4,.7,1,1.5,3.3,5.2,9.5,19.5,30]
    
class PulsarFactory(SolarCoreFactory):
    
    def makeCore(self):
        s = SolarCore()
    
        s.type = SolarCoreEnum.BLACK
        s.letterCode = "Z"
        
        s.massLower = .25
        s.massUpper = 3        
        
        s.diameterLower = 0.1
        s.diameterUpper = 0.5
        
        s.brightnessLower = 0
        s.brightnessUpper = 1
                
        s.makeRandom()
                        
        return s
    
    def getOrbitalTable(self):
        return [.4,.7,1,1.5,3.3,5.2,9.5,19.5,30]
    
class MagnetarFactory(SolarCoreFactory):
    
    def makeCore(self):
        s = SolarCore()
    
        s.type = SolarCoreEnum.BLACK
        s.letterCode = "Z"
        
        s.massLower = .25
        s.massUpper = 3        
        
        s.diameterLower = 0.1
        s.diameterUpper = 0.5
        
        s.brightnessLower = 0
        s.brightnessUpper = 1
                
        s.makeRandom()
                        
        return s
    
    def getOrbitalTable(self):
        return [.4,.7,1,1.5,3.3,5.2,9.5,19.5,30]
    
class BlackFactory(SolarCoreFactory):
    
    def makeCore(self):
        s = SolarCore()
    
        s.type = SolarCoreEnum.BLACK
        s.letterCode = "Z"
        
        s.massLower = .25
        s.massUpper = 3        
        
        s.diameterLower = 0.1
        s.diameterUpper = 0.5
        
        s.brightnessLower = 0
        s.brightnessUpper = 1
                
        s.makeRandom()
                        
        return s
    
    def getOrbitalTable(self):
        return [.4,.7,1,1.5,3.3,5.2,9.5,19.5,30]